package com.bawei.yangzongcai___day2;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bawei.yangzongcai___day2.MVCAcyivity.MainActivity2;
import com.bawei.yangzongcai___day2.MVPActivity.MainActivity;
import com.bawei.yangzongcai___day2.MaiDongFangHong.day1.MaiDongFangHong1;
import com.bawei.yangzongcai___day2.MaiDongFangHong.day2.MaiDongFangHong2;
import com.bawei.yangzongcai___day2.MaiDongFangHong.day3.MaiDongFangHong3;
import com.bawei.yangzongcai___day2.MaiDongFangHong.day4.MaiDongFangHong4;
import com.bawei.yangzongcai___day2.MaiDongFangHong.day5.MaiDongFangHong5;
import com.bawei.yangzongcai___day2.MaiDongFangHong.day6.MaiDongFangHong6;
import com.bawei.yangzongcai___day2.MaiDongFangQi.day15.MaiDongFangQi15;
import com.blankj.utilcode.util.ToastUtils;
import com.frame.lib_common.slidingmenu.SlidingMenu;

import uk.co.senab.photoview.PhotoView;

public class ChiGuaQunZhong extends AppCompatActivity {

    private PhotoView photoview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chi_gua_qun_zhong);
        initView();
        photoview.setImageResource(R.drawable.tubiao_dlam);
        doufanghpngqi();
        SlidingMenu slidingMenu = new SlidingMenu(this);
        slidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
        slidingMenu.setBehindWidth(900);
        slidingMenu.setMode(SlidingMenu.LEFT);
        slidingMenu.setMenu(R.layout.slidingmenu);
        slidingMenu.showContent();
        View menu = slidingMenu.getMenu();//实现点击事件

        menu.findViewById(R.id.xinwei1).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(ChiGuaQunZhong.this, MainActivity.class);
                startActivity(intent);
            }
        });

        menu.findViewById(R.id.xinwei2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(ChiGuaQunZhong.this, MainActivity2.class);
                startActivity(intent);
            }
        });

        menu.findViewById(R.id.xinwei3).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao1/dongfanghong1").navigation();
            }
        });

        menu.findViewById(R.id.xinwei4).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao2/dongfanghong2").navigation();
            }
        });

        menu.findViewById(R.id.xinwei5).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao3/dongfanghong3").navigation();
            }
        });


        menu.findViewById(R.id.xinwei6).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao4/dongfanghong4").navigation();
            }
        });


        menu.findViewById(R.id.xinwei7).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/xinwei7s/maidongfanghong5s").withString("sha","西大洋水库").navigation();
            }
        });


        menu.findViewById(R.id.xinwei8).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/xinwei8s/maidongfanghong6s").withString("hehe","千岛湖水库").navigation();
            }
        });

        menu.findViewById(R.id.xinwei9).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao7/dongfanghong7").withString("luomahu","骆马湖").navigation();
            }
        });

        menu.findViewById(R.id.xinwei10).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao8/dongfanghong8").withString("xibaipo","西柏坡").navigation();
            }
        });
        menu.findViewById(R.id.xinwei11).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao9/dongfanghong9").withString("luomahu","骆马湖").navigation();
            }
        });
        menu.findViewById(R.id.xinwei12).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao10/dongfanghong10").withString("luomahu","骆马湖").navigation();
            }
        });
        menu.findViewById(R.id.xinwei13).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao11/dongfanghong11").withString("luomahu","骆马湖").navigation();
            }
        });
        menu.findViewById(R.id.xinwei14).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/tiao12/dongfanghong12").withString("luomahu","骆马湖").navigation();
            }
        });

    }


    public void doufanghpngqi()
    {
        SlidingMenu slidingMenu2 = new SlidingMenu(this);
        slidingMenu2.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
        slidingMenu2.setBehindWidth(900);
        slidingMenu2.setMode(SlidingMenu.RIGHT);
        slidingMenu2.setMenu(R.layout.slidingmenu2);
        View meizi = slidingMenu2.getMenu();
        //---------------------------第一
        meizi.findViewById(R.id.dongfang1).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下1");
                ARouter.getInstance().build("/hongqi1/dongfanhongqi1").navigation();
            }
        });

        //---------------------------第二
        meizi.findViewById(R.id.dongfang2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下2");
                ARouter.getInstance().build("/hongqi2/dongfanhongqi2").navigation();
            }
        });


        //---------------------------第三
        meizi.findViewById(R.id.dongfang3).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下3");
            }
        });

        //---------------------------第四
        meizi.findViewById(R.id.dongfang4).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下4");
            }
        });

        //---------------------------第五
        meizi.findViewById(R.id.dongfang5).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下5");
            }
        });


        //---------------------------第六
        meizi.findViewById(R.id.dongfang6).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下6");
            }
        });



        //---------------------------第七
        meizi.findViewById(R.id.dongfang7).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下7");
            }
        });


        //---------------------------第七
        meizi.findViewById(R.id.dongfang8).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下8");
            }
        });



        //---------------------------第七
        meizi.findViewById(R.id.dongfang9).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下9");
            }
        });


        //---------------------------第七
        meizi.findViewById(R.id.dongfang10).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下10");
            }
        });


        //---------------------------第七
        meizi.findViewById(R.id.dongfang11).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下11");
            }
        });



        //---------------------------第七
        meizi.findViewById(R.id.dongfang12).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下12");
            }
        });



        //---------------------------第七
        meizi.findViewById(R.id.dongfang13).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下13");
            }
        });



        //---------------------------第七
        meizi.findViewById(R.id.dongfang14).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下14");
            }
        });




        //---------------------------第七
        meizi.findViewById(R.id.dongfang15).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("点击了一下15");
                Intent intent = new Intent(ChiGuaQunZhong.this, MaiDongFangQi15.class);
                startActivity(intent);
            }
        });



    }

    private void initView() {
        photoview = findViewById(R.id.photoview);
    }
}
